package org.example.springbootproject.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.springbootproject.pojo.Warehousing;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface WarehousingMapper {

    @Select("select * from warehousing")
    List<Warehousing> findWarehousing();

    @Insert("insert into warehousing(storage_time,license_plate_number,inbound_qty,inbound_tonnage)" +
            "values(#{date},#{string},#{integer},#{dou}) ")
    void upDateWarehousing(LocalDate date, String string, Integer integer, Double dou);

    @Insert("insert into goods(storage_time,inbound_tonnage)" +
    "values(#{storageTime},#{inboundTonnage})")
    void addGoods(LocalDate storageTime, Double inboundTonnage);
}
